package com.example.mrzhou.lvmm.api;

import com.example.mrzhou.lvmm.entity.home.HomeBanner;
import com.example.mrzhou.lvmm.entity.home.HomeContent;
import com.example.mrzhou.lvmm.entity.home.HomeTitle;

import retrofit2.http.GET;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by Mr.zhou on 2016/10/28.
 */

public interface HomeService {

    String BASE_URL = "http://m.lvmama.com/";
    /**
     * first 一级标题
     */
    String TITLE_URL = "bullet/index.php?s=/Api/getInfos\n" +
            "&channelCode=NSY\n" +
            "&tagCodes=NSY_JDMPFL,NSY_ZBYFL,NSY_GNYFL,NSY_CJYFL\n" +
            "&stationCode=SH\n" +
            "&globalLatitude=39.91325\n" +
            "&globalLongitude=116.403625\n" +
            "&clientTimestamp=1477306905297\n" +
            "&osVersion=4.4.2\n" +
            "&lvversionCode=65\n" +
            "&lvversion=7.7.3\n" +
            "&deviceName=HTC%2BX720d\n" +
            "&firstChannel=ANDROID&udid=864394010002410\n" +
            "&formate=json\n" +
            "&secondChannel=YYB\n";
    @GET(TITLE_URL)
    Observable<HomeTitle> getHomeTitle();

    /**
     * content
     * @return
     */
    String CONTENT_URL = "bullet/index.php?s=/Api/getInfos"+
            "&stationCode=SH" +
            "&page=1&pageSize=10" +
            "&globalLatitude=39.91325&globalLongitude=116.403625" +
            "&osVersion=4.4.2&lvversionCode=65&lvversion=7.7.3" +
            "&deviceName=HTC%2BX720d&firstChannel=ANDROID&udid=864394010002410&formate=json&secondChannel=YYB";
    @GET(CONTENT_URL)
    Observable<HomeContent> getHomeContent(@Query("channelCode") String back_word1, @Query("tagCodes") String back_word2, @Query("time") Long time);

    /**
     * head
     */
    String BANNER_URL = "/bullet/index.php?s=/Api/getInfos&channelCode=NSY&tagCodes=NSY_BANNER7&stationCode=HBWH&globalLatitude=30.586359&globalLongitude=114.334231&clientTimestamp=1477307691928&lvtukey=0509dcd3a3bc1537303fba2d55035fe1&osVersion=4.2.2&lvversionCode=65&lvversion=7.7.3&deviceName=GT-P5210&firstChannel=ANDROID&udid=133524863575402&formate=json&secondChannel=YYB";

    @GET(BANNER_URL)
    Observable<HomeBanner> getHomeBanner();

}
